package showtime.framework.algorithm.bts
{
	public class SequenceNode extends CompositeNode
	{
		public function SequenceNode()
		{
		}
		
		override public function set childResult(value:Boolean):void
		{
			if (!value)
			{
				returnResultToParent(false);
			}
			else
			{
				currentChildNodeIndex++;
				
				if (currentChildNode == null)
				{
					returnResultToParent(true);
				}
				else
				{
					executeChildNode();
				}
			}
		}
	}
}